package com.woniuxy.exception;

import org.springframework.web.bind.annotation.ControllerAdvice;
import org.springframework.web.bind.annotation.ExceptionHandler;

import javax.servlet.http.HttpServletRequest;
@ControllerAdvice
public class GlobalException {
    @ExceptionHandler(Exception.class)
    public String testHanlder(Exception ex, HttpServletRequest request){
        request.setAttribute("ex",ex);
        return "error";
    }
}
